import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import Vant from 'vant'
import 'vant/lib/index.css'
import Geek from '@/components'
import '@/assets/styles/index.less'
import hljs from 'highlight.js'
import 'highlight.js/styles/vs2015.css'
// install函数 定义全局指令
Vue.directive('highlight', (el) => {
  const codeList = el.querySelectorAll('pre code')
  codeList.forEach((code) => {
    hljs.highlightElement(code)
  })
})

Vue.use(Vant)
Vue.use(Geek)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
